package edu.ec.java02.group02.domain;

import java.io.Serializable;
import javax.persistence.*;
@Table(name = "productinfo")
public class ProductInfo implements Serializable {
    @Id
    @Column(name = "product_id")
    private Integer productId;

    @Column(name = "product_name")
    private String productName;

    @Column(name = "product_description")
    private String productDescription;

    @Column(name = "product_inventory")
    private Integer productInventory;

    @Column(name = "product_type")
    private String productType;

    @Column(name = "product_image")
    private String productImage;

    @Column(name = "product_sale_account")
    private Integer productSaleAccount;

    @Column(name = "product_price")
    private Double productPrice;

    @Column(name = "product_state")
    private String productState;

    private  Cart cart;

    public Cart getCart() {
        return cart;
    }

    public void setCart(Cart cart) {
        this.cart = cart;
    }

    private static final long serialVersionUID = 1L;

    /**
     * @return product_id
     */
    public Integer getProductId() {
        return productId;
    }

    /**
     * @param productId
     */
    public void setProductId(Integer productId) {
        this.productId = productId;
    }

    /**
     * @return product_name
     */
    public String getProductName() {
        return productName;
    }

    /**
     * @param productName
     */
    public void setProductName(String productName) {
        this.productName = productName == null ? null : productName.trim();
    }

    /**
     * @return product_description
     */
    public String getProductDescription() {
        return productDescription;
    }

    /**
     * @param productDescription
     */
    public void setProductDescription(String productDescription) {
        this.productDescription = productDescription == null ? null : productDescription.trim();
    }

    /**
     * @return product_inventory
     */
    public Integer getProductInventory() {
        return productInventory;
    }

    /**
     * @param productInventory
     */
    public void setProductInventory(Integer productInventory) {
        this.productInventory = productInventory;
    }

    /**
     * @return product_type
     */
    public String getProductType() {
        return productType;
    }

    /**
     * @param productType
     */
    public void setProductType(String productType) {
        this.productType = productType == null ? null : productType.trim();
    }

    /**
     * @return product_image
     */
    public String getProductImage() {
        return productImage;
    }

    /**
     * @param productImage
     */
    public void setProductImage(String productImage) {
        this.productImage = productImage == null ? null : productImage.trim();
    }

    /**
     * @return product_sale_account
     */
    public Integer getProductSaleAccount() {
        return productSaleAccount;
    }

    /**
     * @param productSaleAccount
     */
    public void setProductSaleAccount(Integer productSaleAccount) {
        this.productSaleAccount = productSaleAccount;
    }

    /**
     * @return product_price
     */
    public Double getProductPrice() {
        return productPrice;
    }

    /**
     * @param productPrice
     */
    public void setProductPrice(Double productPrice) {
        this.productPrice = productPrice;
    }

    /**
     * @return product_state
     */
    public String getProductState() {
        return productState;
    }

    /**
     * @param productState
     */
    public void setProductState(String productState) {
        this.productState = productState == null ? null : productState.trim();
    }

    @Override
    public String toString() {
        StringBuilder sb = new StringBuilder();
        sb.append(getClass().getSimpleName());
        sb.append(" [");
        sb.append("Hash = ").append(hashCode());
        sb.append(", productId=").append(productId);
        sb.append(", productName=").append(productName);
        sb.append(", productDescription=").append(productDescription);
        sb.append(", productInventory=").append(productInventory);
        sb.append(", productType=").append(productType);
        sb.append(", productImage=").append(productImage);
        sb.append(", productSaleAccount=").append(productSaleAccount);
        sb.append(", productPrice=").append(productPrice);
        sb.append(", productState=").append(productState);
        sb.append(", serialVersionUID=").append(serialVersionUID);
        sb.append("]");
        return sb.toString();
    }
}